package com.nxw.springcloud.admin.respository;

import com.nxw.springcloud.admin.entity.DynamicVersion;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DynamicVersionDao extends JpaRepository<DynamicVersion,Long> {

    //获取最后一次发布的版本号
    @Query(value = "select max(id) from open_geteway_version",nativeQuery = true)
    Long getLastVersion();

    //获取所有的版本发布信息
    List<DynamicVersion> findAll();


}